package domain.controller;

import java.io.IOException;
import java.util.Date;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


@SuppressWarnings("serial")
public class CheckLinkIndexServlet extends HttpServlet {
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.setContentType("text/html");
        resp.getWriter().println("Hello, world");
        Date date_cache = new Date(new Date().getTime()+60*60*1000);
		
		resp.setHeader( "Cache-Control", "public, max-age=30");
		resp.setHeader( "Expires", date_cache.toGMTString() );
        req.setAttribute("title", "Check cross link of website");
		req.setAttribute("description", "Check cross link of website.Search the website is cross-linked.");
		req.setAttribute("keyword", "check link,link,link in,linkout,Domain name information,  Server information, Web site analysis, website traffic details, Website backlinks website IP, website ranking info");
        
        try {
			req.getRequestDispatcher("/check_link_index.jsp").forward(req, resp);
		} catch (ServletException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    }

}
